home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 1.6 KB | 44 lines | [TEXT/GEOL] |
- Item forwarded by A33 to A34
-
- Item 8569638 26-April-90 11:58PDT
-
- From: D6020 Info Research, John MacVeigh,PRT
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: RE TEEdit selection problem
-
- Mark,
-
- You most likely have the vertical size determiner for your TEView set to
- sizeVariable. In this case, the view's height is calculated from the size of
- the TE record. The result is that the view's extent is only as "tall" as the
- text, and so ContainsMouse returns False. My solution to this problem used the
- fact that my TEView was a subview of a scroller. By intercpeting the click in
- the scroller (which only occurs if the text is smaller than the scroller view)
- I can pass it on to the TEView:
-
- {$S ASelCommand}
- Function TMyScroller.DoMouseCommand (Var theMouse: Point;
- Var info: EventInfo; Var hysteresis: Point): TCommand; OVERRIDE;
- {overriden so that if the TEView is smaller than the scroller, we
- can intercept clicks in the scroller and make them act like clicks
- at the end of the TEView. This only gets called if TEView is smaller
- than the scoller.}
-
- Begin
- DoMouseCommand := TMyDialog(GetDialogView).fMyTEView.
- DoMouseCommand (theMouse, info, hysteresis)
- End; {TMyScroller.DoMouseCommand}
-
- Fortunately the TEView interprets the mouse position to mean "at the end",
- without any further work on my part.
-
- I don't change the cursor within the scroller, and I'm not sure that it should
- be changed, since that would indicate that you can edit _at that point_, which
- is not technically correct.
-
- Hope this helps,
- John MacVeigh
-
-